<style>
.headinfo {
    background: none;
}
.headinfo .mod-member {
    margin: 0 auto;
	margin-top: -60px;
    width: 94%;
	left:3%;
    padding: 6px 0 10px;
    background-color: #fff;
    border-radius: 10px;
    border: 1px solid #f2f2f2;
}
.headinfo .mod-member .sign-btn{
    position: absolute;
    margin: 0 auto;
	top: -44px;
    width: 36px;
	height: 26px;
	right:16px;
    color:#fff;
	text-align:center;
	padding-top:3px;
    background: #7c1cc9;
}
.bottombg {bottom:-20px;width:100%;height:80px;border-bottom-right-radius:100% 40px;border-bottom-left-radius:100% 40px;}
.mod-group {
    margin: 0 auto;
	margin-top: 5px;
    width: 94%;
    background-color: #fff;
    border-radius: 10px;
    border: 1px solid #f2f2f2;
}
.fui-icon-group .fui-icon-col-sm {
    margin:10px 0;
}
.badge {
    left: 2rem;
    top: 0;
}
.fui-cell-group .fui-cell .fui-cell-label {
	font-size: 0.8rem;
	color: {{main.syscolor || '#7c1cc9'}};
}
</style>
<div class='fui-page fui-page-current'>
	<div class='fui-content member-page'>
		<div class="bottombg" style="background:{{main.syscolor || '#7c1cc9'}};"></div>
		<div class="headinfo" style="height:auto;">		
				<div class="mod-member">
					<div class="sign-btn" style="width:56px;background:{{main.syscolor || '#7c1cc9'}};">￥{{pagedata.renwu.fee}}</div>
					<div class="headinfo" style="background:none;padding:0;color:#999">
												<div class="child userinfo" style="padding-bottom:5px;color:#999;width:4rem">
													<div class="face" style="margin-right:0.6rem;padding: 0.1rem;" href="javascript:;" ng-click="access_json('core/member.cavatar/')">
															<img ng-src="{{tomedia(pagedata.renwu.image) || '../core/resource/images/nopic.jpg'}}" />
													</div>
												</div>
												<div class="child userinfo" style="padding-bottom:0;color:#999;flex: 1;text-align:left;">
													<div class="l bold" style="line-height:1.3;width:100%">{{pagedata.renwu.title}}</div>
													<div class="l" style="line-height:1.3">
														<div style="width:100%;font-size:0.7rem;color:{{main.syscolor || '#7c1cc9'}}">{{pagedata.renwu.typetitle}}</div>
													</div>
												</div>
									
						</div>
						<div class="fui-icon-group noborder  col-4">
												<div class="fui-icon-col-sm external" style="margin:0">
													<div>
														<div class="text bold">{{pagedata.renwu.lastnum || '0'}}</div>
														<div class="subtitle" style="color: #666;">剩余数量</div>
													</div>
												</div>
												<div class="fui-icon-col-sm external" style="margin:0">
													<div>
														<div class="text bold">{{pagedata.renwu.isnum || '0'}}</div>
														<div class="subtitle" style="color: #666;">完成数量</div>
													</div>
												</div>
												<div class="fui-icon-col-sm external" style="margin:0">
													<div>
														<div class="text bold">{{pagedata.renwu.hours_typetitle}}</div>
														<div class="subtitle" style="color: #666;">做单时间</div>
													</div>
												</div>
												<div class="fui-icon-col-sm external" style="margin:0">
													<div>
														<div class="text bold">{{pagedata.renwu.shenhedays || '2'}}天</div>
														<div class="subtitle" style="color: #666;">审核时间</div>
													</div>
												</div>
						</div>
					</div>
				</div>
				<div style="margin:0 0.6rem">
						<div class="fui-cell-group">
							<div class="fui-cell">
								<div class="fui-cell-label syscolor">做单说明</div>
							</div>
							<div class="fui-cell">
								<div class="fui-cell-info subtitle" ng-bind-html="trust(pagedata.pluginset.dandesc)"></div>
							</div>
							<div class="fui-cell">
								<div class="fui-cell-label syscolor">任务说明</div>
							</div>
							<div class="fui-cell">
								<div class="fui-cell-info subtitle" ng-bind-html="trust(pagedata.pluginset.renwudesc)"></div>
							</div>
						</div>
						<div class="fui-cell-group">
							<div class="fui-cell">
								<div class="fui-cell-label">
									<img class="img" style="width:3rem;height:3rem;border-radius:50%" ng-src="{{tomedia(pagedata.fauser.avatar) || '../core/resource/images/nopic.jpg'}}"/>
								</div>
								<div class="fui-cell-info">
									<div class="name overflow-h">{{pagedata.fauser.nickname}}</div>
									<div class="price bold">[UID:{{pagedata.renwu.mid}}]</div>
								</div>
								<div class="fui-cell-remark noremark">
									<i class="icon icon-liaotian" style="font-size:1.5rem"></i>
								</div>
							</div>
						</div>
						<div class="fui-cell-group">
							<div class="fui-cell" ng-click="pagedata.showvideo=true">
								<div class="fui-cell-label syscolor" style="width:auto">做单视频 <i class="icon icon-video"></i></div>
								<div class="fui-cell-info">
								</div>
								<div class="fui-cell-remark">
									
								</div>
							</div>
						</div>
						<div class="fui-cell-group">
							<div class="fui-cell">
								<div class="fui-cell-info">做单步骤（请参考以下步骤完成做单）</div>
							</div>
							<div class="fui-cell">
								<div class="fui-cell-text subtitle">{{pagedata.pluginset.renwudesc}}</div>
							</div>
						</div>
						<div class="weui_cells">
						<div ng-repeat="p in pagedata.renwu.steps">
							<div class="weui_cells_title"><span class="red bold">{{$index+1}}</span>、{{p.title}}</div>
							<div class="weui_cell">
								<div ng-if="p.type==0 || p.type==2" class="weui_cell_bd weui_cell_primary">
									{{p.data}}
								</div>
								<div ng-if="p.type==1 || p.type==3 || p.type==4" class="weui_cell_bd weui_cell_primary">
									<img style="max-width:100%" ng-src="{{tomedia(p.data) ||'../core/resource/images/nopic.jpg'}}"/>
								</div>
							</div>
						</div>
						</div>
			</div>
			<div class="fui-navbar bottom-buttons">
				<a class="nav-item external" href="javascript:" ng-click="access_json('jy_renwushop/index/')">
					<span class="icon jinyunicon icon-dianpu"></span>
					<span class="label">任务首页</span>
				</a>
				<a ng-if="!pagedata.myorder.id" class="nav-item btn buybtn" ng-click="post({'id':pagedata.renwu.id},'/renwu.detail/post/')" style="line-height:1.4;padding-top:0.3rem" >
					<span>¥ <strong>{{pagedata.renwu.fee}}</strong><span style="font-size:0.5rem">(赚)</span></span>
					<span class="label" style="color:#fff;font-size:0.75rem">点击报名</span>
				</a>
				<a ng-if="pagedata.myorder.id && pagedata.myorder.status==0" class="nav-item btn buybtn" ng-click="pagedata.showpost=true;pagedata.uptype();" style="line-height:1.4;padding-top:0.3rem" >
					<span>¥ <strong>{{pagedata.renwu.fee}}</strong><span style="font-size:0.5rem">(赚)</span></span>
					<span class="label" style="color:#fff;font-size:0.75rem">提交任务</span>
				</a>
				<a ng-if="pagedata.myorder.id && pagedata.myorder.status>0" class="nav-item btn buybtn disabled" style="line-height:1.4;padding-top:0.3rem" >
					<span>¥ <strong>{{pagedata.renwu.fee}}</strong><span style="font-size:0.5rem">(赚)</span></span>
					<span class="label" style="color:#fff;font-size:0.75rem">{{pagedata.myorder.statustitle}}</span>
				</a>
			</div>
	</div>
</div>
<div ng-if="pagedata.showpost" class="popup">
	<div class="popup-body">
		<div class="popup-bottom">
			<i class="closed icon icon-cuowu" ng-click="pagedata.showpost=false"></i>
			<div class='fui-content' style="background:#fff;width:auto;padding:0.5rem">
				<div class="weui_cells" style="margin-top:8rpx">
					<div class="title bold" style="padding-bottom:0.5rem">提交任务 / <small>ADD</small></div>
					<div ng-if="pagedata.renwu.type==1" class="weui_cells_title">请浏览视频</div>
					<div ng-if="pagedata.renwu.type==1" class="weui_cell">
						<div class="weui_cell_bd weui_cell_primary">
							<video id="video1" ng-src="{{tomedia(pagedata.renwu.ad_video)}}" height="160" width="100%" x5-playsinline="" playsinline="" webkit-playsinline="" controls="controls" preload="auto"></video>
						</div>
					</div>
					<div class="weui_cells_title">提交说明</div>
					<div class="weui_cell">
						<div class="weui_cell_bd weui_cell_primary">
							<textarea class="weui_textarea" ng-model="pagedata.post.title" placeholder="提交一些文字说明，方便快捷审核任务！" rows="2"></textarea>
						</div>
					</div>
					<div class="weui_cells_title">提交截图</div>
					<div class="weui_cell">
							<div class="weui_uploader">
								<div class="weui_uploader_bd">
									<ul class="weui_uploader_files">
										<li ng-repeat="p in pagedata.post.images" class="weui_uploader_file" style="background-image:url('{{tomedia(p)}}')">
											<div class="upbtn" >
												<a style="color:#f60" href="javascript:;" ng-click="pagedata.post.images.splice($index-1,0,p);pagedata.post.images.splice($index+1,1)">上移</a>
												<a style="color:#f60" href="javascript:;" ng-click="pagedata.post.images.splice($index,1)">删除</a>
											</div>
										</li>
									</ul>
									<div class="weui_uploader_input_wrp" href="javascript:;" ng-click="images(pagedata.post,'images')"></div>
								</div>
							</div>
					</div>
				</div>
				<div class="weui_btn_area">
					<a class="weui_btn weui_btn_primary" style="background:#00c568;" ng-click="pagedata.sub();">提交</a>
				</div>
			</div>
		</div>
	</div>
</div>
<div ng-if="pagedata.showvideo" class="popup">
	<div class="popup-body">
		<div class="popup-center">
			<i class="closed icon icon-cuowu" ng-click="pagedata.showvideo=false"></i>
			<div class="weui_cells" style="margin-top:8rpx">
			<div class="weui_cell">
				<div class="weui_cell_bd weui_cell_primary">
					<video ng-src="{{tomedia(pagedata.renwu.ad_video)}}" height="160" width="100%" x5-playsinline="" playsinline="" webkit-playsinline="" controls="controls" preload="auto"></video>
				</div>
			</div>
			</div>
		</div>
	</div>
</div>
<div ng-include="sys_html('common/_menu')"></div>
<div ng-include="sys_html('common/_footer')"></div>
<div ng-include="sys_html('common/_share')"></div>
<script>
// 禁止快进

scope.pagedata.uptype=function(){
	if(scope.pagedata.renwu.type==1){
		setTimeout(function(){
			$(document).ready(function(){
			  $("#video1").on(
				"timeupdate", 
				function(event){
				  scope.pagedata.post.currentTime=this.currentTime
				  scope.pagedata.post.duration=this.duration
				  //console.log(this.currentTime);
				  //console.log(this.duration);
				});
			});
			var sym;
			var video = document.getElementById("video1");
			setInterval(function () {
				var time = video.currentTime
				if (time - sym > 1) {
				  video.currentTime = sym
				}
				sym = video.currentTime
			 }, 500);
		},500);
	}
}
scope.pagedata.sub=function(){
	if(scope.pagedata.renwu.type==1){
		if(!scope.pagedata.post.duration || scope.pagedata.post.duration>scope.pagedata.post.currentTime){
			scope.message('请先播放完视频，再提交任务哦！');
			return false;
		}
	}
	scope.post(scope.pagedata.post,'/renwu.detail/subdata/');
}
</script>